<?php

namespace AdminPanel\MenuBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class MenuType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('nameMn')
            ->add('nameEn')
            ->add('slug')
            ->add('targetUrl')
            ->add('contentId')
            ->add('isAdminMenu')
            ->add('sortOrder')
            ->add('isActive')
            ->add('roles')
            ->add('icon')
            ->add('createdAt')
            ->add('createdUserId')
            ->add('updatedAt')
            ->add('updatedUserId')
            ->add('updatedIp')
        ;
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'AdminPanel\MenuBundle\Entity\Menu'
        ));
    }

    public function getName()
    {
        return 'adminpanel_menubundle_menutype';
    }
}
